package com.more.offer.designpatterns.shareunit;

import java.awt.*;

/**
 * @author pinoc
 * @date 2021/10/25
 * @description
 */
public class Tree {
	private  int x;

	private int y;

	private TreeType type;

	public Tree(int x, int y, TreeType type) {
		this.x = x;
		this.y = y;
		this.type = type;
	}

	public void draw(Graphics g) {
		type.draw(g, x, y);
	}
}
